import React from "react";
import * as THREE from "three";
import Controller from "../../../../Controller";
import IElement from "../../../../interface/IElement";

export default function usePalm(controller: Controller) {

    const selectedTool = controller.useMemo(s => s.selectedTool, []);

    const elementMap = controller.useMemo(s => s.elementMap, []);

    React.useEffect(() => {
        if (selectedTool === 'select') {
            elementMap.forEach((e:IElement<THREE.Object3D>)=>{
                switch (e.object3D.type) {
                    case 'Mesh':
                        const ob = e.object3D as THREE.Mesh;
                        break;
                
                    default:
                        break;
                }
            })
        } else {

        }
    }, [elementMap, selectedTool])
}